/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.traderecord.entity;

import com.jeeplus.modules.subgoods.entity.SubGoods;
import com.jeeplus.modules.member.entity.Member;

import com.jeeplus.core.persistence.DataEntity;
import com.jeeplus.common.utils.excel.annotation.ExcelField;

/**
 * 成交记录Entity
 * @author w
 * @version 2021-03-27
 */
public class TradeRecord extends DataEntity<TradeRecord> {
	
	private static final long serialVersionUID = 1L;
	private SubGoods subGoods;		// 交易商品
	private Integer num;		// 交易数量
	private Member saleMember;		// 卖出用户
	private String saleOrderNo;		// 卖出订单
	private Member purchaseMember;		// 买入用户
	private String purchaseOrder;		// 买入订单
	private Double price;		// 成交单价
	private Double totalPrice;		//总价

	private String exportTime;

	//前端市场行情用
	private Double maxPrice;
	private Double minPrice;
	private Integer totalNum;
	
	public TradeRecord() {
		super();
	}

	public TradeRecord(String id){
		super(id);
	}

	@ExcelField(title="交易商品", fieldType=SubGoods.class, value="subGoods.goodsName", align=2, sort=1)
	public SubGoods getSubGoods() {
		return subGoods;
	}

	public void setSubGoods(SubGoods subGoods) {
		this.subGoods = subGoods;
	}
	
	@ExcelField(title="交易数量", align=2, sort=2)
	public Integer getNum() {
		return num;
	}

	public void setNum(Integer num) {
		this.num = num;
	}
	
	@ExcelField(title="卖出用户", fieldType=Member.class, value="saleMember.loginName", align=2, sort=3)
	public Member getSaleMember() {
		return saleMember;
	}

	public void setSaleMember(Member saleMember) {
		this.saleMember = saleMember;
	}
	
	@ExcelField(title="卖出订单", align=2, sort=4)
	public String getSaleOrderNo() {
		return saleOrderNo;
	}

	public void setSaleOrderNo(String saleOrderNo) {
		this.saleOrderNo = saleOrderNo;
	}
	
	@ExcelField(title="买入用户", fieldType=Member.class, value="purchaseMember.loginName", align=2, sort=5)
	public Member getPurchaseMember() {
		return purchaseMember;
	}

	public void setPurchaseMember(Member purchaseMember) {
		this.purchaseMember = purchaseMember;
	}
	
	@ExcelField(title="买入订单", align=2, sort=6)
	public String getPurchaseOrder() {
		return purchaseOrder;
	}

	public void setPurchaseOrder(String purchaseOrder) {
		this.purchaseOrder = purchaseOrder;
	}
	
	@ExcelField(title="成交单价", align=2, sort=7)
	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public Double getMaxPrice() {
		return maxPrice;
	}

	public void setMaxPrice(Double maxPrice) {
		this.maxPrice = maxPrice;
	}

	public Double getMinPrice() {
		return minPrice;
	}

	public void setMinPrice(Double minPrice) {
		this.minPrice = minPrice;
	}

	public Integer getTotalNum() {
		return totalNum;
	}

	public void setTotalNum(Integer totalNum) {
		this.totalNum = totalNum;
	}

	public Double getTotalPrice() {
		return totalPrice;
	}

	public void setTotalPrice(Double totalPrice) {
		this.totalPrice = totalPrice;
	}

	@ExcelField(title="成交时间", align=2, sort=7)
	public String getExportTime() {
		return exportTime;
	}

	public void setExportTime(String exportTime) {
		this.exportTime = exportTime;
	}
}